<template>
  <div class="box">
    <h1>Child</h1>
    <p>接收的值是{{count}}</p>
    <button @click="update">修改count的值</button>
    <button @click="changeCount(2)">向父组件发送参数修改count</button>
  </div>
</template>

<script>
export default {
    name:'Child',
    props:['count','changeCount'],
    methods: {
      update(){
        this.count++
      }
    },
}
</script>

<style scoped>
    .box{
        background: yellowgreen;
    }
</style>